<?php
/**
 * Created by PhpStorm.
 * User: fengtian
 * Date: 15-4-10
 * Time: 下午9:24
 */
?>

<div id="container<?php if(isset($sku)&&isset($su_id)){
    echo $sku.$su_id;
} ?>" style="width: 1000px; height: 400px; margin: 0 auto"></div>

<script>
    $(function () {
        $('#container<?php if(isset($sku)&&isset($su_id)){echo $sku.$su_id;}?>').highcharts({
            title: {
                text: "<?php if(isset($sku)&& $sku){
                        echo $sku;
                    }?>交期曲线图",
                x: -20
            },
            xAxis: {
                categories: [
                    <?php
                        if(isset($put_sec) && $put_sec)
                        {
                            foreach($put_sec as $v)
                            {
                                echo "'".$v."',";
                            }
                        }
                    ?>
                ]
            },
            yAxis: {
                title: {
                    text: '天数'
                },
                plotLines: [
                    {
                        value: 0,
                        width: 1,
                        color: '#808080'
                    }
                ]
            },
            credits: {
                //enabled: false      //是否显示
                text: '时间'
            },
            tooltip: {
                valueSuffix: '天'
            },
            legend: {
                layout: 'vertical',
                align: 'right',
                verticalAlign: 'middle',
                borderWidth: 0
            },
            series: [
                {
                    name: "<?php echo $sku;?>",
                    data: [<?php
                    if(isset($ldt_sec) && $ldt_sec)
                    {
                        foreach($ldt_sec as $v)
                        {
                            echo $v.',';
                        }
                    }
                ?>]
                }
            ]
        });
    })


</script>


